This invention relates generally to expert systems, and more particularly to an expert system for processing knowledge concerning a large-scale artificial system.
Various systems have been proposed for expert systems that store knowledge of human experts in a knowledge base and make judgments similar to those of the human experts. Currently, the most popular inference method is a so-called production system. Other methods use frames to represent knowledge.
In some of these production systems, the method used is to perform forward reasoning, while in other production systems, the method used is to perform backward reasoning. The production system for performing forward reasoning is a system in which the cycle of recognition and action of a human is modeled. Namely, this kind of production system recognizes the current status and then determines the content of the next action.
FIG. 2 of the accompanying drawings shows the general structure of this production system. As shown in FIG. 2, the production system generally comprises a knowledge base 201 and an inference engine 202. Inside the knowledge base 201 there are included a plurality of rules 203, a plurality of knowledge representations, e.g. a plurality of frames 204, and a work area 205.
The rules 203 include a condition section, which contains condition instructions for recognizing the status stored in the frames 204 or the work area 205, and an instruction section in which the action to be executed is described. Using these rules, the inference engine 202 repeats three steps to execute an inference, i.e. matching process 206, conflict resolution 207 and action 208.
The matching process 206 in the inference engine 202 is the step of retrieving the rules that have condition instructions which match the current status stored in the work area 203 or the frames 205 and then integrating a set of both the matching rules and the status values as a conflict set 209. The conflict resolution 207 is the step of selecting one rule to be executed from the obtained conflict set 209. The action 208 is the step of executing, such as the updating of the content of the work area or the frames, according to the description in the instruction section of the selected rule.
The frames representing knowledge are frames for systematically and hierarchically representing information concerning a knowledge processing object. FIG. 3 shows an example in which knowledge concerning components of an electric circuit is hierarchically represented by frames.
In FIG. 3, a frame 301 of the uppermost class defines an attribute of class as electrical components. In the illustrated example, the frame of electrical components, which define the class of electrical components, has two slots, i.e., name of manufacturing company 302 and date of production 303. Lower frames 304, 305, 306 preceding frame 301 define classes of more specific types of entries, such as resistor 304, coil 305 and condenser 306.
The frame of resistor 304, which defines the class of resistor, has the type of resistor 307 as a slot for storing the type of resistor and has the resistance 308 as a slot for storing the resistance of the resistor.
Thus frames 309, 310 represent knowledge about individual components as follows:
Component R1 of the frame 309 has resistor as class, and hence has type of resistor and resistance, which are slots defined in class of resistor. PA1 (a) a knowledge base for storing knowledge expressed by frames each having one or more slots in each of which a knowledge is described as a slot value; and PA1 (b) an indexing device including
The class of resistor 304 of component R1 in the frame 309 is a lower class subordinate to the electrical component 301, and hence succeeds also to the attribute of the electrical component 301, having two slots, i.e. manufacturing company 302 and date of production 303, which are defined in the class of electrical components. Then the actual name of a company and other information are stored in the respective slots to express information about an individual electrical component. The frames are stored in a data base systematically storing data as described above and are capable of storing a process specific to the frames.
FIG. 4 shows an example in which a process specific to the frame is stored by a function called demon and a function called method. In FIG. 4, in the frame fr1, slots S11 and S12 are defined and have stored in them the values 10 and 5, respectively.
In the slot S11, the procedure func1 having a character `when-changed` is defined as a demon, while in the slot S12, the procedure func2 having a character `when-asked` is also defined as a demon.
The character `when-asked` executes when the slot value stored in the slot is referred to externally, while the character `when-changed` executes when the slot value is updated. Therefore, when the value of the slot S11 is updated, the procedure func1 is executed with the value of the slot S11 as an argument. Also in FIG. 4, func3 is a procedure called method which is a procedure effective only in the frame fr1.
The method func3 is executed by giving the name of method `func3` as a message passed to the frame fr1 from an external source. After executing the defined processes, the method func3 returns the value of the executed result back as a reply to the frame or rule that sent the message.
As discussed above, a production system is a simple but very general technique. Since frames can systematically represent knowledge, they are widely used in expert systems. However, assuming that the conventional production system and frames are applied to an actual large-scale plant or an artificial large-scale system, such as power, communications or transportation networks, a practical inference speed cannot be achieved.
These problems will now be described item by item in greater detail.